package com.xiaoshuidi.cloud.module.finance.enums.finance;

import lombok.Getter;

public enum AccountTradeTypeEnum {
    ONLINE_RECHARGE("线上"), OFFLINE_RECHARGE("线下"), DEDUCT("扣费"), REFUND("退款"), WITHDRAW("提现");

    @Getter
    private final String desc;
    AccountTradeTypeEnum(String desc) {
        this.desc = desc;
    }

    public static String getDesc(String name) {
        for (AccountTradeTypeEnum value : values()) {
            if (value.name().equals(name)) {
                return value.getDesc();
            }
        }
        return "未知";
    }
}
